package util;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class ContentManager {

	/* Make sure class can't be constructed */
	private ContentManager() {
	}
	
	/** Reads an image from disk */
	public static BufferedImage loadImage(String filePath) throws Exception {
		BufferedImage image = null;
		File file = null;
		try
		{
			file = new File(filePath);
		    image = ImageIO.read(file);
		}
		catch (IOException ioe)
		{
			throw new Exception("File could not be found: " + filePath, ioe);
		}
		return image;
	}
}